<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
		<title>信息维护</title>
		<link rel="stylesheet" href="../js/layui/css/layui.css" media="all" />
		<script type="text/javascript" src="../js/layui/layui.js"></script>
		<script type="text/javascript" src="../js/demo.js">
		</script>
</head>
<body>
 
<%
request.setCharacterEncoding("UTF-8");
String username = request.getParameter("username");
String password = request.getParameter("password");
String sex = request.getParameter("sex");
String hobby = request.getParameter("hobby");
String address = request.getParameter("address");
int id = Integer.parseInt(request.getParameter("id")) ;

%>
<form action="/Test2022/UpdateServlet?id=<%=id%>" method="post" class="layui-form" id="tanchu">
			
		<div class="layui-form-item">
			<label class="layui-form-label">账户</label>
			<div class="layui-input-block">
		    <input type="text" class="layui-input" style="width: 7.5rem;" value="<%=username%>"  name="username" readonly="readonly"> 
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">密码</label>
			<div class="layui-input-block">
		    <input type="text" class="layui-input" style="width: 7.5rem;" value="<%=password%>"  name="username"> 
			</div>
		</div>
		
	
			<div class="layui-form-item" id="sexdiv">
			<label class="layui-form-label" >性别</label>
			<div class="layui-input-block">
				<input type="radio" name="sex" value="男" <%=sex.equals("男")?"checked":"" %> title="男" id="sex" >
				<input type="radio" name="sex" value="女" <%=sex.equals("女")?"checked":"" %> title="女" id="sex">
			</div>
		</div>
	
	<div class="layui-form-item" id ="hobbitdiv">
		<label class="layui-form-label">爱好</label>
		<div class="layui-input-block">
			 <input type="checkbox"  title="跑步" value="跑步" <%=hobby.contains("跑步")?"checked":"" %> name="hobby"  >
			 <input type="checkbox"  title="游泳"  value="游泳" <%=hobby.contains("游泳")?"checked":"" %> name="hobby">
			 <input type="checkbox" title="羽毛球"  value="羽毛球" <%=hobby.contains("羽毛球")?"checked":"" %> name="hobby">
		</div>
	</div>	
	
	<div class="layui-form-item">
		<label class="layui-form-label" id ="city_id" >城市</label>
		<div class="layui-input-block" style="width: 7.5rem;">
			<select  id="address"  name="address">
				<option value="北京"<%=address.equals("北京")?"selected":"" %> >北京</option>
				<option value="上海" <%=address.equals("上海")?"selected":"" %> >上海</option>
				<option value="广州"<%=address.equals("广州")?"selected":"" %> >广州</option>
				<option value="厦门" <%=address.equals("厦门")?"selected":"" %>>厦门</option>
				<option value="福州" <%=address.equals("福州")?"selected":"" %>>福州</option>
				<option value="青岛"<%=address.equals("青岛")?"selected":"" %>>青岛</option>
				<option value="济南"<%=address.equals("济南")?"selected":"" %>>济南</option>
				<option value="深圳"<%=address.equals("深圳")?"selected":"" %>>深圳</option>
				<option value="天津"<%=address.equals("天津")?"selected":"" %>>天津</option>
				<option value="三亚"<%=address.equals("三亚")?"selected":"" %>>三亚</option>
				<option value="杭州"<%=address.equals("杭州")?"selected":"" %>>杭州</option>
				<option value="成都"<%=address.equals("成都")?"selected":"" %>>成都</option>
				<option value="郑州"<%=address.equals("郑州")?"selected":"" %>>郑州</option>
				<option value="济南"<%=address.equals("济南")?"selected":"" %>>济南</option>
				<option value="潍坊"<%=address.equals("潍坊")?"selected":"" %>>潍坊</option>
			</select>	
		</div>
	</div>
	
	
		<div >
			<div >
			<input type="submit" value="确定" class="layui-btn" />
			 <input type="reset"   value="重置" id="resetid" class="layui-btn"/> 
			
	
			</div>
		</div>
			
		</form>

</body>



</html>